package account;

public class Demo01 {
    public static void main(String[] args) {
        Account myAccount = new Account(1000);

        try {
            myAccount.deposit(200);
            System.out.println("存款后余额:" + myAccount.getBalance());
            myAccount.withdraw(1500);
            System.out.println("取款后余额:" + myAccount.getBalance());
        } catch (InsufficientFundsException|IllegalArgumentException e) {
            System.out.println("发生错误:"+e.getMessage());
            e.printStackTrace();
        }
    }
}
